package graduate.wangyaqi.SeveralQuestions;

import graduate.wangyaqi.ProgrammeQuestions.ProgrammeQuestions;
import org.springframework.data.repository.CrudRepository;

import java.util.Optional;

public interface SeveralQuestionsRepository extends CrudRepository<SeveralQuestions,Long> {
    Iterable<SeveralQuestions> findAllByTaotiID(long taotiID);

    int countAllByTaotiID(Long taotaoId);

    SeveralQuestions getFirstByTaotiIDAndIdGreaterThan(long taotiId, long id);

    SeveralQuestions getFirstByTaotiIDAndIdLessThanOrderByIdDesc(long taotiId, long id);

    @Override
    Optional<SeveralQuestions> findById(Long aLong);
}
